package com.lei.chinese_herbal_medicine.Entity;

import java.io.Serializable;

public class Model implements Serializable {
    private String id;

    private String modelName;

    private Integer batchSize;

    private String shuffle;

    private Float accuracyRate;

    private Float lossRate;

    private String layearOneId;
    private Layer layearOne;

    private String layearTwoId;
    private Layer layearTwo;
    private String layearThreeId;
    private Layer layearThree;
    private byte[] modelData;

    private String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    private static final long serialVersionUID = 1L;

    public Model(String id, String modelName, Integer batchSize, String shuffle, Layer layearOne,Layer layearTwo,Layer layearThree) {
        this.id = id;
        this.modelName = modelName;
        this.batchSize = batchSize;
        this.shuffle = shuffle;
        this.layearOne = layearOne;
        this.layearTwo = layearTwo;
        this.layearThree = layearThree;
    }

    public Model() {
    }

    public Layer getLayearOne() {
        return layearOne;
    }

    public void setLayearOne(Layer layearOne) {
        this.layearOne = layearOne;
    }

    public Layer getLayearTwo() {
        return layearTwo;
    }

    public void setLayearTwo(Layer layearTwo) {
        this.layearTwo = layearTwo;
    }

    public Layer getLayearThree() {
        return layearThree;
    }

    public void setLayearThree(Layer layearThree) {
        this.layearThree = layearThree;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName == null ? null : modelName.trim();
    }

    public Integer getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
    }

    public String getShuffle() {
        return shuffle;
    }

    public void setShuffle(String shuffle) {
        this.shuffle = shuffle == null ? null : shuffle.trim();
    }

    public Float getAccuracyRate() {
        return accuracyRate;
    }

    public void setAccuracyRate(Float accuracyRate) {
        this.accuracyRate = accuracyRate;
    }

    public Float getLossRate() {
        return lossRate;
    }

    public void setLossRate(Float lossRate) {
        this.lossRate = lossRate;
    }

    public String getLayearOneId() {
        return layearOneId;
    }

    public void setLayearOneId(String layearOneId) {
        this.layearOneId = layearOneId == null ? null : layearOneId.trim();
    }

    public String getLayearTwoId() {
        return layearTwoId;
    }

    public void setLayearTwoId(String layearTwoId) {
        this.layearTwoId = layearTwoId == null ? null : layearTwoId.trim();
    }

    public String getLayearThreeId() {
        return layearThreeId;
    }

    public void setLayearThreeId(String layearThreeId) {
        this.layearThreeId = layearThreeId == null ? null : layearThreeId.trim();
    }

    public byte[] getModelData() {
        return modelData;
    }

    public void setModelData(byte[] modelData) {
        this.modelData = modelData;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Model other = (Model) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getModelName() == null ? other.getModelName() == null : this.getModelName().equals(other.getModelName()))
            && (this.getBatchSize() == null ? other.getBatchSize() == null : this.getBatchSize().equals(other.getBatchSize()))
            && (this.getShuffle() == null ? other.getShuffle() == null : this.getShuffle().equals(other.getShuffle()))
            && (this.getAccuracyRate() == null ? other.getAccuracyRate() == null : this.getAccuracyRate().equals(other.getAccuracyRate()))
            && (this.getLossRate() == null ? other.getLossRate() == null : this.getLossRate().equals(other.getLossRate()))
            && (this.getLayearOneId() == null ? other.getLayearOneId() == null : this.getLayearOneId().equals(other.getLayearOneId()))
            && (this.getLayearTwoId() == null ? other.getLayearTwoId() == null : this.getLayearTwoId().equals(other.getLayearTwoId()))
            && (this.getLayearThreeId() == null ? other.getLayearThreeId() == null : this.getLayearThreeId().equals(other.getLayearThreeId()))
            && (this.getModelData() == null ? other.getModelData() == null : this.getModelData().equals(other.getModelData()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getModelName() == null) ? 0 : getModelName().hashCode());
        result = prime * result + ((getBatchSize() == null) ? 0 : getBatchSize().hashCode());
        result = prime * result + ((getShuffle() == null) ? 0 : getShuffle().hashCode());
        result = prime * result + ((getAccuracyRate() == null) ? 0 : getAccuracyRate().hashCode());
        result = prime * result + ((getLossRate() == null) ? 0 : getLossRate().hashCode());
        result = prime * result + ((getLayearOneId() == null) ? 0 : getLayearOneId().hashCode());
        result = prime * result + ((getLayearTwoId() == null) ? 0 : getLayearTwoId().hashCode());
        result = prime * result + ((getLayearThreeId() == null) ? 0 : getLayearThreeId().hashCode());
        result = prime * result + ((getModelData() == null) ? 0 : getModelData().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", modelName=").append(modelName);
        sb.append(", batchSize=").append(batchSize);
        sb.append(", shuffle=").append(shuffle);
        sb.append(", accuracyRate=").append(accuracyRate);
        sb.append(", lossRate=").append(lossRate);
        sb.append(", layearOneId=").append(layearOneId);
        sb.append(", layearTwoId=").append(layearTwoId);
        sb.append(", layearThreeId=").append(layearThreeId);
        sb.append(", modelData=").append(modelData);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
